<!DOCTYPE html>
<html>
	<head>
		<base href="{$base_name}"/>
		<meta charset="utf-8" />
		<meta content="yes" name="apple-touch-fullscreen">
		<meta content="yes" name="apple-mobile-web-app-capable">
        <meta content="telephone=no,email=no" name="format-detection">
		<script type="text/javascript" src="libs/flexible_css.js"></script>
		<script type="text/javascript" src="libs/config.js"></script>
		<script type="text/javascript" src="libs/flexible.js"></script>
		<script type="text/javascript" src="libs/jquery-1.7.2.min.js"></script>
		<!-- <script type="text/javascript" src="libs/artTemplate.js"></script> -->
		<!-- <script type="text/javascript" src="js/class.js"></script> -->
		<link rel="stylesheet" type="text/css" href="css/details.css">
	</head>
	<body>
		<div id="container">

			
		</div>
	</body>
</html>

<style>

</style>
<script id="tmpl" type="text/html">
<div class="stage">
	<ul>
{{# for(var i = 0, len = d.data.length; i < len; i++){ }}
	{{#  if(d.data[i].tree_level == 0){  }}
		<li><span>{{ d.data[i].title }}</span></li>
	{{#  } }}
	{{#  if(d.data[i].tree_level == 1){  }}
		<li class="selected"><a href="{{ d.data[i].url }}"><div class="">{{ d.data[i].title }}</div></a></li>
	{{#  } }}
{{# } }}
	</ul>
</div>
<div class="popbg">
	<div class="popcontent">
		<p>通过上一节课程测试，可解锁本节课程</p>
		<div class="ys">知道了</div>
	</div>
</div>
</script>
<script src="./layui/laytpl.js"></script>
<script>
function in_array(search,array){
    for(var i in array){
        if(array[i]==search){
            return true;
        }
    }
    return false;
}
function get_json_page(){
	$.getJSON(root+'/class/rookie_class/', function(data){
		//alert(data.data.length);
		
		var dt = data;
		var gettpl = $('#tmpl').html();
		laytpl(gettpl).render(dt, function(html){
			$('#container').append(html);
		});
	});
}


//删除所有li
$('#container div').remove();

get_json_page();

$(".lock").live('click',function () {
	$(".popbg").css("display","block");
})
$(".ys").live('click',function () {
	$(".popbg").css("display","none");
})
</script>
